﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Configuration;
using EasyBuildingCMS.BLL.Config;
using System.Web.Profile;
using System.Web;

namespace EasyBuildingCMS.BLL
{
    public sealed class Globals
    {
        public static readonly EasyBuildingCMSSection Settings =
            ((EasyBuildingCMSSection)WebConfigurationManager.GetSection("easyBuildingCMS"));

        public static string CurrentPage
        {
            get 
            {
                if (HttpContext.Current.Session["CurrrentPage"] == null) return null;
                else return HttpContext.Current.Session["CurrrentPage"].ToString();
            }
            set
            {
                HttpContext.Current.Session["CurrrentPage"] = value;
            }
        }

        public static string Mode
        {
            get
            {
                if (HttpContext.Current.Session["Mode"] == null)
                    HttpContext.Current.Session["Mode"] = "View";
                return HttpContext.Current.Session["Mode"].ToString();
            }
            set
            {
                HttpContext.Current.Session["Mode"] = value;
            }
        }
     
    }
}
